//
//  MyTabBarController.m
//  项目A --半糖
//
//  Created by romana on 16/6/3.
//  Copyright © 2016年 romana. All rights reserved.
//

#import "MyTabBarController.h"
#import <DKNightVersion.h>

@interface MyTabBarController ()

@end

@implementation MyTabBarController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    
    //tabbar 1
    MainViewController *mainVC = [[MainViewController alloc] init];
    UINavigationController *mainNA = [[UINavigationController alloc] initWithRootViewController:mainVC];
    mainNA.tabBarItem = [[UITabBarItem alloc] initWithTitle:NULL image:[UIImage imageNamed:@"homeImage"] selectedImage:[UIImage imageNamed:@"homeImageRed"]];
    
    //tabbar 2
    SecondViewController *secondVC = [[SecondViewController alloc] init];
    UINavigationController *secondNa = [[UINavigationController alloc] initWithRootViewController:secondVC];
    secondNa.tabBarItem = [[UITabBarItem alloc] initWithTitle:NULL image:[UIImage imageNamed:@"discImage"] selectedImage:[UIImage imageNamed:@"discImageRed"]]
    ;
    
    //tabbar 3
    ThirdViewController *thirdVC = [[ThirdViewController alloc] init];
    UINavigationController *thirdNa = [[UINavigationController alloc] initWithRootViewController:thirdVC];
    
    thirdNa.tabBarItem = [[UITabBarItem alloc] initWithTitle:NULL image:[UIImage imageNamed:@"present4"] selectedImage:[UIImage imageNamed:@"present3"]];
    
    //tabbar 4
    FourViewController *fourthVC = [[FourViewController alloc] init];
    UINavigationController *fourthNa = [[UINavigationController alloc] initWithRootViewController:fourthVC];
    
    fourthNa.tabBarItem = [[UITabBarItem alloc] initWithTitle:nil image:[UIImage imageNamed:@"persImage"] selectedImage:[UIImage imageNamed:@"persImageRed"]];
    
    //将建好的视图给tabbar
    
    
    self.viewControllers = @[mainNA,secondNa,thirdNa,fourthNa];
    
    //设置tabBar的选中颜色
    self.tabBar.tintColor = [UIColor redColor];
    
    //设置tabBar的背景颜色
   // self.tabBar.barTintColor = [UIColor whiteColor];
    
    //设置是否半透明
    self.tabBar.translucent = NO;
    
    //夜间模式
    self.tabBar.dk_barTintColorPicker = DKColorPickerWithRGB(0xD3D3D3,0x696969);

    
    
    
    
    
    
    // Do any additional setup after loading the view.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
